import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import api from '@/api'
import plugin from '@/components'
import '@/utils/rem'
import Vant, { Lazyload, Toast } from 'vant'
Toast.setDefaultOptions('loading', { forbidClick: true, message: '加载中...', duration: 5000 })
import 'vant/lib/index.css'
const app = createApp(App)
app
  .use(Lazyload, {
    loading: require('_img/music.png'),
    error: require('_img/music.png'),
    attempt: 1
  })
  .use(store)
  .use(router)
  .use(Vant)
  .use(plugin)
  .mount('#app')

app.config.globalProperties.$api = api
